package com.ruoyi.asset.roadgreening.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

import com.ruoyi.asset.cleaning.domain.bo.CleaningCommunityCountBo;
import com.ruoyi.asset.cleaning.domain.bo.CleaningRoadTypeBo;
import com.ruoyi.asset.roadgreening.domain.bo.RoadGreeningTypeBo;
import com.ruoyi.asset.roadgreening.domain.vo.GreeneryCommunityCountVo;
import com.ruoyi.asset.workman.domain.bo.WorkmanSearchBo;
import com.ruoyi.asset.workman.domain.vo.WorkmanVo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.roadgreening.domain.RoadGreening;
import com.ruoyi.asset.roadgreening.domain.bo.MaintenanceScopeSearchBo;
import com.ruoyi.asset.roadgreening.domain.bo.RoadGreeningOverviewBo;
import com.ruoyi.asset.roadgreening.domain.bo.StatisticianGreeneryByRegion;
import com.ruoyi.asset.roadgreening.domain.vo.RoadGreeningVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;

/**
 * 道路绿化管养任务完成进度Mapper接口
 *
 * @author cc
 * @date 2023-08-29
 */
public interface RoadGreeningMapper extends BaseMapperPlus<RoadGreeningMapper, RoadGreening, RoadGreeningVo> {
    /**
     * 删除管养范围
     */
    int logicDeleteMaintenanceScope(@Param("idsSet") Set<Long> idsSet);

    /**
     * 查询管养范围
     */
    Page<RoadGreeningVo> selectMaintenanceScopeWithPage(IPage<RoadGreeningVo> page, @Param("searchBo") MaintenanceScopeSearchBo searchBo);

    /**
     * 查询管养范围
     */
    List<RoadGreeningVo> exportMaintenanceScope(MaintenanceScopeSearchBo searchBo);

    /**
     * 查询树数量和绿化面积
     */
    RoadGreeningOverviewBo getTreeCountAndArea();

    /**
     * 查询工人数量
     */
    RoadGreeningOverviewBo getWorkerCount();

    /**
     * 按区统计道路绿化
     */
    List<StatisticianGreeneryByRegion> statForGreeneryByRegion();

    List<RoadGreeningTypeBo> getRoadGreeningCommunityCount(@Param("community") String community);

    List<RoadGreeningTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);

    GreeneryCommunityCountVo selectGreeneryCountByCommunity(@Param("date") String date,@Param("community") String community);

    List<BigDecimal> selectSumDate(@Param("date") String date);
}
